import request from "@/utils/request3";

export function patroladd(map) {
  return request({
    url: '/spotcheckPlan/addPatrol',
    method: "post",
    data: JSON.stringify(map),
    header: {
      "Content-Type": "application/json", //如果写成contentType会报错
    },
  });
}


export function detailadd(map) {
  return request({
    url: '/spotcheckPlan/addDetail',
    method: "post",
    data: JSON.stringify(map),
    header: {
      "Content-Type": "application/json", //如果写成contentType会报错
    },
  });
}


export function taskadd(map) {
  return request({
    url: '/spotcheckPlan/addTask',
    method: "post",
    data: JSON.stringify(map),
    header: {
      "Content-Type": "application/json", //如果写成contentType会报错
    },
  });
}



export function upload(map) {
  return request({
    url: '/spotcheckPlan/upload',
    method: "post",
    data: JSON.stringify(map),
    header: {
      "Content-Type": "application/json", //如果写成contentType会报错
    },
  });
}



export function adjust(map) {
  return request({
    url: '/spotcheckPlan/adjust',
    method: "post",
    data: JSON.stringify(map),
    header: {
      "Content-Type": "application/json", //如果写成contentType会报错
    },
  });
}

export function selectPmts(code,condition) {
  return request({
    url: '/spotcheckPlan/selectPmts',
    method: "get",
    params:{code:code,condition:condition}
  });
}
export function del(id,code) {
  return request({
    url: '/spotcheckPlan/del',
    method: "get",
    params:{id:id,code:code}
  });
}